
package com.jiuqi.irs.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for payeraccount.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="payeraccountForm"
 */
public class PayeraccountForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _payerGuid = null;
   private java.lang.String _orgCode = null;
   private java.lang.String _payerName = null;
   private java.lang.String _payerAccount = null;
   private java.lang.String _payerBank = null;
   private java.lang.String _isDisabledFlag = null;
   private java.lang.String _createTime = null;
   private java.lang.String _payerYear = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public PayeraccountForm() {
   }

   /**
    * Returns the payerGuid
    *
    * @return the payerGuid
    */
   public java.lang.String getPayerGuid() {
      return _payerGuid;
   }

   /**
    * Sets the payerGuid
    *
    * @param payerGuid the new payerGuid value
    */
   public void setPayerGuid(java.lang.String payerGuid) {
      _payerGuid = payerGuid;
   }
   /**
    * Returns the orgCode
    *
    * @return the orgCode
    */
   public java.lang.String getOrgCode() {
      return _orgCode;
   }

   /**
    * Sets the orgCode
    *
    * @param orgCode the new orgCode value
    */
   public void setOrgCode(java.lang.String orgCode) {
      _orgCode = orgCode;
   }
   /**
    * Returns the payerName
    *
    * @return the payerName
    */
   public java.lang.String getPayerName() {
      return _payerName;
   }

   /**
    * Sets the payerName
    *
    * @param payerName the new payerName value
    */
   public void setPayerName(java.lang.String payerName) {
      _payerName = payerName;
   }
   /**
    * Returns the payerAccount
    *
    * @return the payerAccount
    */
   public java.lang.String getPayerAccount() {
      return _payerAccount;
   }

   /**
    * Sets the payerAccount
    *
    * @param payerAccount the new payerAccount value
    */
   public void setPayerAccount(java.lang.String payerAccount) {
      _payerAccount = payerAccount;
   }
   /**
    * Returns the payerBank
    *
    * @return the payerBank
    */
   public java.lang.String getPayerBank() {
      return _payerBank;
   }

   /**
    * Sets the payerBank
    *
    * @param payerBank the new payerBank value
    */
   public void setPayerBank(java.lang.String payerBank) {
      _payerBank = payerBank;
   }
   /**
    * Returns the isDisabledFlag
    *
    * @return the isDisabledFlag
    */
   public java.lang.String getIsDisabledFlag() {
      return _isDisabledFlag;
   }

   /**
    * Sets the isDisabledFlag
    *
    * @param isDisabledFlag the new isDisabledFlag value
    */
   public void setIsDisabledFlag(java.lang.String isDisabledFlag) {
      _isDisabledFlag = isDisabledFlag;
   }
   /**
    * Returns the createTime
    *
    * @return the createTime
    */
   public java.lang.String getCreateTime() {
      return _createTime;
   }

   /**
    * Sets the createTime
    *
    * @param createTime the new createTime value
    */
   public void setCreateTime(java.lang.String createTime) {
      _createTime = createTime;
   }
   /**
    * Returns the payerYear
    *
    * @return the payerYear
    */
   public java.lang.String getPayerYear() {
      return _payerYear;
   }

   /**
    * Sets the payerYear
    *
    * @param payerYear the new payerYear value
    */
   public void setPayerYear(java.lang.String payerYear) {
      _payerYear = payerYear;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getPayerGuid() == null) {
         errors.add("payerGuid", new ActionError("error.payerGuid.required"));
      }
      if(getOrgCode() == null) {
         errors.add("orgCode", new ActionError("error.orgCode.required"));
      }
      // TODO test format/data
      return errors;
   }
}
